<template>
  <div class="login">
    <el-form>
      <el-form-item label="账号：">
        <el-input maxlength="20" type="text" v-model="loginInfo.username" placeholder="请输入账号"></el-input>
      </el-form-item>
      <el-form-item label="密码：">
        <el-input maxlength="20" type="password" v-model="loginInfo.password" placeholder="请输入密码"></el-input>
      </el-form-item>
      <el-button type="primary" @click="onSumbit">登录</el-button>
    </el-form>
  </div>
</template>

<script lang="ts" setup>
import { ref } from 'vue'
    const loginInfo = ref ({
      username: '',
      password: ''
    })
    const onSumbit = () => {
      console.log(loginInfo)
      loginInfo.value.username = 'qqqqqqq'
      console.log('-----', loginInfo)
    }
</script>

<style lang="scss">

</style>
